<template>
  <el-select :value="t(`common.languages.${locale}`)" :placeholder="t('settings.language.placeholder')" @change="changeLocale">
    <el-option v-for="item in languages" :key="item" :label="t(`common.languages.${item}`)" :value="item"> </el-option>
  </el-select>
</template>

<script setup lang="ts">
import { useLocale } from '@/hooks/settings/useLocale';
import { SupportLanguage } from '@/types/enums';

const languages = values(SupportLanguage);
const { changeLocale } = useLocale();
const { t, locale } = useI18n();
</script>

<style scoped></style>
